/**
 * Created by yujia on 16/3/29.
 */

$("#reg").click(function () {
    var JsonData = {
        userName: $("#name").val(),
        userPassword: $("#pwd").val(),
        userNickname: $("#nickname").val(),
        userDescription: $("#des").val()
    }

    $.ajax({
        type: 'POST',
        url: "/user/register.json",
        dataType: 'json',
        //contentType: "application/json",
        //data: JSON.stringify(JsonData),
        data: JsonData,
        success: function(data){
            alert('数据加载成功');
        },
        error: function(xhr, type){
            alert('数据加载失败');
        }
    });
});